package LuoGuACM;
//过河卒
import java.util.Scanner;
class Main1{
    public static int mx,my,bx,by;
    static long[][] val = new long[24][24];
    static int[][] map = new int[24][24];
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        bx = in.nextInt();by = in.nextInt();//目标坐标
        mx = in.nextInt();my = in.nextInt();//马的坐标

        bx += 2; by += 2; mx += 2; my += 2;//平移棋盘上物体的位置
        map[mx][my] = 1;//标记马的位置为1
        for (int i = 2; i < 24; i++) {
            val[2][i] = 1;val[i][2] = 1;//标记边界位置为1
        }

        map[mx - 1][my + 2] = 1;map[mx + 1][my + 2] = 1;//马左足标记为1
        map[mx - 1][my - 2] = 1;map[mx + 1][my - 2] = 1;//右
        map[mx - 2][my - 1] = 1;map[mx - 2][my + 1] = 1;//上
        map[mx + 2][my - 1] = 1;map[mx + 2][my + 1] = 1;//下

        val[1][2]= 1;
        for (int i = 2; i <= bx; i++) {
            for (int j = 2; j <= by; j++) {
                if (map[i][j] == 1) {
                    val[i][j] = 0;
                    continue;
                }
                val[i][j] = val[i-1][j] + val[i][j-1];
            }
        }
        System.out.println(val[bx][by]);
    }
}
